package gui;

import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.MenuBar;

import javax.swing.JFrame;
import javax.swing.JMenuBar;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

import sqlstuff.SQLManage;

public class Main {
	public static void main(String[] args) {
		// Create and set up the window.
		SQLManage sql = new SQLManage();
		sql.setup();
		try {
			UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
		} catch (ClassNotFoundException | InstantiationException
				| IllegalAccessException | UnsupportedLookAndFeelException e) {
			e.printStackTrace();
		}
		JFrame frame = new JFrame(
				"Enterprise Farm Productivity Management Suite: Agricultural Edition 2015: Goose Poop Expansion Pack");
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.setPreferredSize(new Dimension(1800,900));
		// Add content to the window.
		JMenuBar menuBar = new MenuBarSet();
		frame.setJMenuBar(menuBar);
		frame.add(new DataTables(sql), BorderLayout.CENTER);
		
		// Display the window.
		frame.pack();
		frame.setVisible(true);

	}

}
